home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / U-Utilities / (c)u3.d64 / diskette mod.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-11  |  2KB  |  46 lines

  1. 100 PRINT"[147]DISKETTE VIEWER/CHANGER**JIM BUTTERFIELD"
  2. 110 PRINT"   CAUTION - USE CARE - THIS PROGRAM"
  3. 115 PRINT "ADAPTED BY BRIAN SCHOTT TO FIX DISKETTE SECTORS"
  4. 118 REM 1041 NORTH HILLS DRIVE, DECATUR, GEORGIA, 30033
  5. 119 REM MAY 1983, FOR C64
  6. 120 PRINT"       CAN WRECK YOUR DISKETTE IF USED"
  7. 130 PRINT"      WITHOUT CARE & UNDERSTANDING!"
  8. 135 PRINT"DO YOU WANT INSTRUCTIONS"
  9. 136 GETY$:IFY$=""THEN136
  10. 137 IFY$<>"N"THEN1200
  11. 140 POKE53281,11
  12. 160 S1=16
  13. 170 S2=255:S3=37
  14. 180 DIM A(255)
  15. 190 B$=CHR$(17):D$="0"
  16. 210 OPEN 15,8,15,"I"+D$:GOSUB500
  17. 220 OPEN2,8,2,"#0":GOSUB500
  18. 230 PRINT" TRACK,SECTOR  0,0[157][157][157][157][157]";
  19. 240 INPUTT,S
  20. 250 IFT<1ORT>35THENCLOSE2:CLOSE15:END
  21. 260 PRINT" WORKING ":PRINT#15,"U1:2,";D$;T;S:GOSUB500
  22. 275 PRINT"[147]";
  23. 280 FORJ=0TO255
  24. 300 GET#2,A$:IFA$=""THENA$=CHR$(0)
  25. 310 A(J)=ASC(A$):NEXTJ
  26. 320 P=0:CL=1
  27. 330 PRINT"[147]TRACK";T;"SECTOR";S
  28. 340 FORJ=PTOP+S2STEPS1:PRINT"]";
  29. 350 V=J:GOSUB800:K$="":PRINT"- ";:FORK=0TOS1-1:V=A(J+K):GOSUB800:K$="":CL=1-CL
  30. 355 PRINTCHR$(18);:IFCL=1THENPRINTCHR$(146);
  31. 356 REM IF YOU PREFER CHANGE 18 TO 144 AND CHANGE 146 TO 144 IN STATEMENT 355
  32. 360 NEXT K:PRINT"-":NEXTJ
  33. 365 PRINT"";
  34. 370 PRINT"CHANGE THE FIRST CHARACTER TO [ TO READ CHANGED SCREEN ONTO THE DISK"
  35. 380 PRINT"CHANGE THE FIRST CHARACTER TO \ TO ABORT THIS PROCESS"
  36. 390 OPEN1,3:CMD1
  37. 440 INPUTC$:PRINT;:Z=ASC(C$):C$=C$
  38. 450 PRINT#1:CLOSE1
  39. 460 IFZ=91GOTO530
  40. 470 IFZ=93GOTO390
  41. 475 IFZ=147GOTO390
  42. 480 GOTO230
  43. 500 REM
  44. 510 INPUT#15,E,E$,E1,E2:IFE=0THENRETURN
  45. 520 PRINT"DISK ERROR:[146]"E;E
  46.